package cn.edu.gdut.deepcode.service;

import cn.edu.gdut.deepcode.domain.dto.CanvasDTO;
import cn.edu.gdut.deepcode.domain.po.Canvas;
import cn.edu.gdut.deepcode.domain.po.Result;
import cn.edu.gdut.deepcode.domain.vo.CanvasVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 画布基础信息表 服务类
 * </p>
 *
 * @author author
 * @since 2025-04-11
 */
public interface ICanvasService extends IService<Canvas> {

    Result<List<CanvasVO>> getAllCanvasInfo() throws JsonProcessingException;
    Result<Long> saveCanvasInfo(CanvasDTO canvasDTO);

    Result<?> updateCanvasInfo(CanvasDTO canvasDTO);

    Result<?> deleteCanvasInfoById(Long canvasId);
    void deleteCollaboratorCanvasInfos(Map<Long,List<Long>> map, Long canvasId);

    Result<CanvasVO> getCanvasInfoById(Long canvasId) throws JsonProcessingException;


    Result<?> updateCanvasTitle(CanvasDTO canvasDTO);

    Result<?> updateCanvasImg(CanvasDTO canvasDTO);
}
